using System;
using System.Collections.Generic;
using System.Text;

namespace Kevin.Framework.Data.Query
{
    public class SubQuery : ExpressionClip
    {
        public readonly Database Db;
        //public readonly Cu
        internal SubQuery(Database db)
        {
           //Check.Require(db, "db");

            this.Db = db;
        }

        public new SubQuery Alias(string aliasName)
        {
           //Check.Require(aliasName, "aliasName", Check.NotNullOrEmpty);

            this.sql.Append(' ');
            SqlQueryUtils.AppendColumnName(this.sql, aliasName);

            return this;
        }

        public SelectSqlSection Select(params ExpressionClip[] columns)
        {
           //Check.Require(columns, "columns", Check.NotNullOrEmpty);

            //SelectSqlSection select = this.Db.Select(new CustomQueryTable(this), columns);
            throw new Exception("");
        }
    }
}
